package com.jueming.cashbook.business.controller;

import com.jueming.cashbook.business.service.CashBookService;
import com.jueming.cashbook.common.response.R;
import com.jueming.cashbook.entity.CashBook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("cash-book")
public class CashBookController {

    @Autowired
    private CashBookService cashBookService;

    @RequestMapping("get-by-id")
    public R getById(CashBook cashBook){
        CashBook result = cashBookService.getById(cashBook);
        return R.SUCCESS(result);
    }
}
